package com.koocloud.electroplatemanage.controller;

import com.koocloud.electroplatemanage.common.pojo.ResponseTemplate;
import com.koocloud.electroplatemanage.service.StatReportService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: electroplatemanage
 * @description: 报表控制层
 * @author: xxc
 * @create: 2020-10-13 09:20
 */
@RestController
@RequestMapping("/statreport")
public class StatReportColltroller {
    static Logger log = Logger.getLogger("statreport");

    @Autowired
    StatReportService statReportService;


    /**
     *@Description: 整体按月完成情况
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectAllMonthStatus", method = RequestMethod.POST, name = "整体按月完成情况")
    public ResponseTemplate selectAllMonthStatus(String year){
        return statReportService.selectAllMonthStatus(year);
    }

    /**
     *@Description: 整体按周完成情况
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectAllWeekStatus", method = RequestMethod.POST, name = "整体按周完成情况")
    public ResponseTemplate selectAllWeekStatus(String year,String page){
        return statReportService.selectAllWeekStatus(year,page);
    }

    /**
     *@Description: 个人按月完成项数
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonMonthTerms", method = RequestMethod.POST, name = "个人按月完成项数")
    public ResponseTemplate selectPersonMonthTerms(String year){
        return statReportService.selectPersonMonthTerms(year);
    }

    /**
     *@Description: 个人按月完成件数
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonMonthCounts", method = RequestMethod.POST, name = "个人按月完成件数")
    public ResponseTemplate selectPersonMonthCounts(String year){
        return statReportService.selectPersonMonthCounts(year);
    }

    /**
     *@Description: 个人按月完成件数含税总价
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonMonthPrices", method = RequestMethod.POST, name = "个人按月完成件数含税总价")
    public ResponseTemplate selectPersonMonthPrices(String year){
        return statReportService.selectPersonMonthPrices(year);
    }

    /**
     *@Description: 个人按月完成件数总工时
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonMonthTimes", method = RequestMethod.POST, name = "个人按月完成件数总工时")
    public ResponseTemplate selectPersonMonthTimes(String year){
        return statReportService.selectPersonMonthTimes(year);

    }

    /**
     *@Description: 个人按周完成项数
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonWeekTerms", method = RequestMethod.POST, name = "个人按周完成项数")
    public ResponseTemplate selectPersonWeekTerms(String year){
        return statReportService.selectPersonWeekTerms(year);
    }

    /**
     *@Description: 个人按周完成件数
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonWeekCounts", method = RequestMethod.POST, name = "个人按周完成件数")
    public ResponseTemplate selectPersonWeekCounts(String year){
        return statReportService.selectPersonWeekCounts(year);
    }

    /**
     *@Description: 个人按周完成件数含税总价
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonWeekPrices", method = RequestMethod.POST, name = "个人按周完成件数含税总价")
    public ResponseTemplate selectPersonWeekPrices(String year){
        return statReportService.selectPersonWeekPrices(year);
    }

    /**
     *@Description: 个人按周完成件数总工时
     *@Param: [year]
     *@return: com.koocloud.electroplatemanage.common.pojo.ResponseTemplate
     *@Author: xxc
     *@date: 2020/10/13
     */
    @RequestMapping(value = "/selectPersonWeekTimes", method = RequestMethod.POST, name = "个人按周完成件数总工时")
    public ResponseTemplate selectPersonWeekTimes(String year){
        return statReportService.selectPersonWeekTimes(year);

    }
}
